@import './theme.less';
@import './theme-dark.less';
@import './protable.less';

* {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

html,
body,
#app {
  height: 100%;
}

::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 2px;
  box-shadow: inset 0 0 5px rgba(37, 37, 37, 0.05);
}
::-webkit-scrollbar-thumb {
  background: #202020;
  border-radius: 3px;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
}

input:-webkit-autofill {
  transition: background-color 5000s ease-in-out 0s;
}

.el-textarea.is-disabled .el-textarea__inner,
.el-input.is-disabled .el-input__wrapper {
  background: #e8e8e8;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.ml10 {
  margin-left: 10px;
}

.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  .main-title {
    height: 34px;
    display: flex;
    margin-left: 6px;
    font-size: 14px;
    align-items: center;
    color: rgba(0, 0, 0, 0.88);
  }
  .main-content {
    flex: 1;
    height: 0px;
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    & > div {
      display: flex;
      flex-direction: column;
      height: 100%;
      .main-option {
        display: flex;
        justify-content: flex-end;
        padding: 15px 0 0;
      }
      .jl-datagrid {
        flex: 1;
        height: 0px;
        padding-top: 15px;
        width: calc(100% + 10px);

        .el-table__header {
          border-top: none;
          th {
            height: 48px;
            line-height: 48px;
            background: #fafafa;

            .cell {
              height: 20px;
              line-height: initial;
              color: #161616;
              font-size: 14px;
              font-weight: 600;
              padding: 0 12px 0 20px;
            }
          }
        }

        .el-table__inner-wrapper::before {
          height: 0;
        }

        td.el-table__cell .cell {
          height: 48px;
          line-height: 48px;
          white-space: nowrap;
          padding: 0 12px 0 20px;
        }

        .el-table__header-wrapper,
        .el-scrollbar__wrap {
          padding-right: 10px;
        }
        .el-scrollbar__bar.is-horizontal {
          display: none;
        }

        tr.el-table__row {
          font-size: 14px;
          font-weight: 400;
          color: #161616;

          &.hover-row {
            font-weight: 500;
          }
        }

        .el-table .el-table__cell {
          padding: 0.43rem 0;
        }

        .pager {
          justify-content: flex-end;
          padding-top: 10px;
          padding-right: 10px;
        }
      }
    }
  }
}

.points {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.el-button--text:not(.is-disabled):focus,
.el-button.is-link:not(.is-disabled):hover,
.el-button.is-link:not(.is-disabled):focus {
  color: #0066ff;
}
.el-button--primary.is-link.is-disabled,
.el-button--primary.is-link.is-disabled:hover {
  color: rgba(0, 0, 0, 0.25);
}

.el-card {
  transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  border: none;
  border-radius: 6px;
  box-shadow: rgba(58, 53, 65, 0.1) 0px 2px 10px 0px !important;

  .el-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    h4 {
      margin-bottom: 16px;
    }
  }
}

.el-aside {
  display: flex;
  flex-direction: column;
  z-index: 99;
  background: #fff;
  box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
  .el-menu {
    border-right: none;
  }
}

.search-from {
  background: #f4f4f4;
  border-radius: 4px;
  padding-left: 8px;
  .el-form-item {
    margin-top: 8px;
    margin-bottom: 8px;

    .el-form-item__label {
      font-size: 14px;
      font-weight: 400;
      color: #353535;
    }

    .el-input__wrapper {
      box-shadow: 0 0 0 1px #fff;

      &:hover {
        box-shadow: 0 0 0 1px #dcdfe6 inset;
      }

      &.is-active,
      &.is-focus {
        box-shadow: 0 0 0 1px #0560fd inset;
      }
    }

    .el-date-editor .el-range-separator {
      color: #353535;
      opacity: 0.5;
    }

    .el-button {
      min-width: 88px;
    }
  }
}

svg.svg-icon {
  margin-right: 0;
}

.center-detail {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
}

.table-btn-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  .btn {
    color: #0560fd;
    font-size: 14px;
    cursor: pointer;
    &.is-disabled {
      color: #a8abb2;
    }
    & + .btn {
      margin-left: 10px;
    }
  }
}

#cesiumContainer {
  background-color: #464646;
}

// 弹窗
.el-dialog {
  max-height: calc(100vh - 90px);
  border-radius: 16px;
  .el-dialog__header {
    padding-top: 30px;

    .el-dialog__close {
      font-size: 18px;
    }
  }
  .el-dialog__body {
    height: 0;
    flex: 1;
    overflow-y: auto;
  }
  &__footer {
    padding-bottom: 30px;
    text-align: center;
    .el-button {
      width: 113px;
      height: 40px;
      border-radius: 4px;
      border-color: #0560fd;
      &--primary {
        background-color: #0560fd;
      }
      & + .el-button {
        margin-left: 16px;
      }
    }
  }
  .el-form {
    &-item {
      &__label {
        height: 44px;
        line-height: 44px;
      }
    }
    --el-text-color-regular: #333 !important;
    .el-input {
      --el-input-height: 44px;
      --el-input-bg-color: #fff;
      --el-input-border-color: #dcdfe6;
    }
    .el-select {
      width: 100%;
    }
  }
}

// 确认框弹窗
.el-message-box {
  border-radius: 16px;
  padding-bottom: 20px;
  &__header {
    padding: 0;
    .el-message-box__headerbtn {
      top: 22px;
      right: 22px;
      z-index: 1;
      &:hover {
        .el-message-box__close {
          color: fade(#999, 80%);
        }
      }
    }
    .el-message-box__close {
      font-size: 18px;
      color: fade(#999, 80%);
    }
  }
  &__content {
    padding: 20px 24px 12px;
    .el-icon {
      background-image: url('~@/assets/png/warn.png');
      background-size: contain;
      top: 0;
      transform: none;
      svg {
        display: none;
      }
      &.el-message-box-icon--warning {
        background-image: url('~@/assets/png/warn.png');
      }
      &.el-message-box-icon--success {
        background-image: url('~@/assets/png/success.png');
      }
    }
  }
  &__message {
    color: rgba(0, 0, 0, 0.88);
    padding-right: 0px !important;
    .title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .sub-title {
      font-size: 14px;
      font-weight: 400;
    }
  }
  &__btns {
    padding: 0 24px;
  }
  &.dark {
    background: #2e2e2e;
    box-shadow: 0px 12px 48px 16px rgba(0, 0, 0, 0.03), 0px 9px 28px 0px rgba(0, 0, 0, 0.05),
      0px 6px 16px -8px rgba(0, 0, 0, 0.08);
    border: none;
    .el-message-box__headerbtn {
      &:hover {
        .el-message-box__close {
          color: fade(#999, 60%);
        }
      }
    }
    .el-message-box__message {
      color: rgba(255, 255, 255, 0.88);
    }
    .el-message-box__btns {
      .el-button {
        color: #fff;
        border-color: rgba(71, 71, 71, 1);
        background-color: transparent;
        &:hover {
          background-color: rgba(71, 71, 71, 1);
        }
      }
      .el-button--primary {
        border-color: var(--el-button-hover-border-color);
        background-color: var(--el-button-hover-bg-color);
        &:hover {
          background-color: var(--el-button-hover-bg-color);
        }
      }
    }
  }
}

// 按钮
.el-button {
  --el-border-radius-base: 4px;
  --el-button-hover-bg-color: transparent;
  &--info {
    --el-button-hover-bg-color: #303640;
  }
  &--primary {
    --el-button-hover-border-color: #0560fd;
    --el-button-hover-bg-color: #0560fd;
  }
}

.el-input__wrapper,
.el-textarea__inner {
  --el-input-border-radius: 4px;
  transform: translate3d(0, 0, 0) !important;
}

.gis-container-web-div {
  position: absolute;
  width: 1px;
  height: 1px;
  display: flex !important;
  pointer-events: none;
}

// tabs
.panel-tabs-old {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: transparent;
  border-color: transparent;

  &.el-tabs--border-card {
    border: none;
  }

  .el-tabs__header {
    background: #0a0b0d;
    border: none;
  }

  &.el-tabs--border-card > .el-tabs__header .el-tabs__item,
  .el-tabs__item {
    height: 28px;
    width: 100%;
    background: #0a0b0d;
    border: none;
    border-top: 2px solid #0a0b0d;
    margin-top: 0;
    // margin-bottom: -1px!important;
    align-items: baseline;
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    &.is-active {
      background: #171a17 !important;
      border-color: #0560fd;
      height: 28px;
      font-size: 16px;
      color: #0560fd;
    }
  }
  .el-tabs__nav {
    width: 100%;
    display: flex;
  }
  .el-tabs__content {
    height: 100%;
    overflow-y: auto;
    padding: 15px 10px;
    background-color: #303030;
  }

  // :deep(.el-tabs__content) {
  //   height: 100%;
  //   overflow-y: auto;
  //   padding: 15px 0;
  //   background-color: #171A1F;
  // }
}

// 颜色选择器
.el-color-picker__trigger {
  padding: 0;
  border-radius: 4px;
  border: 1px solid #ffffff;

  i.el-icon.el-color-picker__empty.is-icon-close {
    display: none;
  }
  i.el-icon.el-color-picker__icon.is-icon-arrow-down {
    display: none;
  }
}

// 数字输入框
.el-input-number.is-controls-right .el-input-number__decrease {
  border-left: none;
}

.el-input-number .el-input__inner {
  text-align: left;
}

// 深色版下拉选择组件
.dark-select-popper.el-popper.is-light {
  background: #0a0b0d !important;
  border: 1px solid rgba(151, 151, 151, 0.3) !important;

  .el-select-dropdown__item.selected {
    background: #33373f;
    color: #0560fd;
    margin: 0 10px;
    font-weight: 500;
  }
  .el-select-dropdown__item {
    margin: 0 10px;
    font-weight: 400;
  }

  .el-select-dropdown__item.hover,
  .el-select-dropdown__item:hover {
    background: #33373f;
    color: #0560fd;
    opacity: 0.8;
  }
  .el-popper__arrow {
    display: none;
  }
}

// 深色版表格样式
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  .dark-table {
    border-collapse: collapse;
    width: 100%;
    color: #fff;

    background: rgba(36, 44, 52, 0.3);
    border-radius: 4px;

    th,
    td {
      border: 1px solid rgba(69, 72, 81, 0.6);
      padding: 0 8px;
      // text-align: center;
      // font-size: 14px;
      // font-family: PingFangSC-Regular, PingFang SC;
      // font-weight: 400;
      // color: #ffffff;

      height: 30px;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #ffffff;
      line-height: 30px;
      // background-clip: text;
      // -webkit-text-fill-color: transparent;
    }

    th {
      background: rgba(36, 44, 52, 0.3);
      white-space: nowrap;
    }

    tr:nth-child(even) {
      background: rgba(36, 44, 52, 0.3);
    }
    tr:nth-child(odd) {
      background: rgba(36, 44, 52, 0.3);
    }
  }

  /* 自定义横向滚动条样式 */
  /* 滚动条整体 */
  &::-webkit-scrollbar {
    height: 3px;
  }

  /* 滚动条轨道 */
  &::-webkit-scrollbar-track {
    background: #2f333b;
  }

  /* 滚动条滑块 */
  &::-webkit-scrollbar-thumb {
    background: #0560fd;
    opacity: 0.54;
  }

  /* 滚动条滑块悬停状态 */
  &::-webkit-scrollbar-thumb:hover {
    background: #0560fd;
    opacity: 0.6;
  }
}

// 时区进度条
.time-zone.el-slider {
  margin: 0 3px;

  .el-slider__button {
    border-color: #ffffff;
    background-color: #0560fd;
  }

  .el-slider__bar,
  .el-slider__runway {
    background: linear-gradient(90deg, #000bff 0%, #ffab00 53%, #005eff 100%);
  }
  .el-slider__marks-text {
    color: #fff;
  }

  .el-slider__stop {
    width: 8px;
    height: 8px;
    background: #aeb2bc;
    transform: translate(-50%, -1px);
    border-radius: 50%;
  }

  &.disable {
    .el-slider__bar,
    .el-slider__runway {
      background: #aeb2bc;
    }

    .el-slider__stop {
      background: #aeb2bc;
    }

    .el-slider__button {
      background-color: #aeb2bc;
    }
  }
}

.el-pagination {
  --el-pagination-button-bg-color: #fff;
  --el-disabled-bg-color: #fff;
  --el-pagination-border-radius: 4px;
  .is-first {
    margin-right: auto;
  }
  .btn-prev,
  .btn-next {
    font-size: 16px;
  }
  .el-select .el-input {
    width: 110px;
  }
  .el-pagination__editor.el-input {
    width: 48px;
  }
  .el-pager li {
    color: #51575a;
  }
}

// 普通滑块
.progress.el-slider {
  .el-slider__button {
    border-color: #ffffff;
    background-color: #0560fd;
  }
}

// 深色版气泡对号框
.dark-confirm.el-popper.is-light {
  padding: 16px;
  border: 1px solid #333435;
  background: #0a0b0c;
  box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05), 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
    0px 3px 6px -4px rgba(0, 0, 0, 0.12);

  .el-popconfirm__main {
    height: 22px;
    line-height: 22px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #fff;
    .el-popconfirm__icon {
      margin-right: 8px;
      font-size: 16px;
    }
  }

  .el-popconfirm__action {
    margin-top: 15px;
    .el-button {
      width: 49px;
      height: 24px;
      & + .el-button {
        margin-left: 8px;
      }

      &.is-text {
        border: 1px solid #045ffc;
        color: rgba(255, 255, 255, 0.88);

        &:hover,
        &:focus {
          background: #161616;
        }
      }
    }
  }

  .el-popper__arrow {
    display: none;
  }
}

// 收缩菜单
.dark-popper {
  width: 96px;
  background: #181b1f;
  box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05), 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
    0px 3px 6px -4px rgba(0, 0, 0, 0.12);
  border-radius: 4px;

  &.el-popper.is-light {
    border: none;
  }

  .el-menu--popup {
    min-width: auto;
    padding: 6px 0 9px;
  }

  .nest-menu .el-menu-item {
    justify-content: center;
    color: #fff;
    opacity: 0.65;
    margin-top: 3px;

    &.select {
      opacity: 1;
    }

    .menu-icon {
      display: none;
    }
    .title {
      margin-left: 0;
    }
  }
}

.custom-message-box {
  border-radius: 8px;
}

.popper-tooltip {
  .download-btn {
    width: 84px;
    height: 24px;
    border-radius: 4px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
  }
  .download-btn:hover {
    background: #0560fd;
  }
}
.popper-white {
  background: #1d1d1d !important;
  border: none !important;
  width: 100px !important;
  min-width: 100px !important;
  padding: 10px 12px 8px !important;
  .operation-li {
    text-align: center;
    cursor: pointer;
  }
  .edit {
    height: 24px;
    background: #0560fd;
    border-radius: 2px;
    line-height: 24px;
    color: #fff;
  }
  .delete {
    color: #ff5454;
    line-height: 24px;
  }
}
.warning-style {
  background: #e6f1ff;
  border-radius: 2px;
  border-color: #5099ff;
  top: 165px !important;
  .el-message__content {
    color: #1f2329;
    font-size: 14px;
    font-weight: 500;
  }
  .el-message-icon--warning {
    color: blue;
  }
}
